{include file='../common_admin/left_bar.php'}
<link href="{$CSSDIR}/emoji.css?cb={time()}" rel="stylesheet" type="text/css" />
<form enctype="multipart/form-data" method="post"  action="">

<div class="table_top">
    <div class="table_top_l">共找到({$count})条会员信息</div>
    <div class="table_top_r">
      <ul>
        <li ><a href="{$URL}m=member&a=main">全部</a></li>

<!-- {foreach from=$_G.group item=v}
 <li {if $_GET.groupid==$v.id} class="on"{/if}><a href="{$URL}m=member&a=main&groupid={$v.id}">{$v.name}</a></li>
{/foreach}  -->

 <!-- <li {if $_GET.check == '1'} class="on"{/if}><a href="{$URL}m=member&a=main&check=1">待审核</a></li>
 <li {if $_GET.check == '0'} class="on"{/if}><a href="{$URL}m=member&a=main&check=0">未审核</a></li>
 
 <li {if $_GET.seller == '1'} class="on"{/if}><a href="{$URL}m=member&a=main&seller=1">商家</a></li>
 <li {if $_GET.seller == '0'} class="on"{/if}><a href="{$URL}m=member&a=main&seller=0">普通用户</a></li>  -->
<li>
<a href="{$URL}m=member&a=main&groupid=24">微信小程序</a>
</li>

<li>
<a href="{$URL}m=member&a=main&groupid=25">微信公众号</a>
</li>

<li {if $_GET.order == 'login_count'} class="on"{/if}>
<a href="{$URL}m=member&a=main{if $groupid ==''}{else}&groupid={$groupid}{/if}&order=login_count&sort={if $_GET.sort=='desc'}asc{else}desc{/if}">登录次数</a>
</li>

<li {if $_GET.order == 'regdate'} class="on"{/if}>
<a href="{$URL}m=member&a=main{if $groupid ==''}{else}&groupid={$groupid}{/if}&order=regdate&sort={if $_GET.sort=='desc'}asc{else}desc{/if}">注册时间</a>
</li>

<li {if $_GET.order == 'login_time'} class="on"{/if}>
<a href="{$URL}m=member&a=main{if $groupid ==''}{else}&groupid={$groupid}{/if}&order=login_time&sort={if $_GET.sort=='desc'}asc{else}desc{/if}">登录时间</a>
</li>
<!-- <li {if $_GET.order == 'jf'} class="on"{/if}>

<a href="{$URL}m=member&a=main&{if $_GET.groupid!=''}groupid={$v.id}{/if}&order=jf&sort={if $_GET.sort=='desc'}asc{else}desc{/if}">积分</a>
</li> -->
<li {if $_GET.order == 'jf'} class="on"{/if}>

<a href="{$URL}m=member&a=formid">formid的查询</a>
</li>


      </ul>
    </div>
  </div>

开始时间:
<input type="text" name="starttime"  class="txt _dateline starttime" readonly="readonly" value="{$starttime}" />
结束时间:
<input type="text" name="endtime"  class="txt _dateline endtime" readonly="readonly" value="{$endtime}" />
<select name="selecttype" id="selecttype">

<option value="xiaochengxu">微信小程序</option>


</select>

  <a  onclick="tijiao(this)" class="btn find" href="#">查询</a>
总人数:{$count}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="button" value="关掉所有去玩的页面" class="btn" onclick="closeplay()">
    <input type="button" value="开启所有去玩的页面" class="btn" onclick="openplay()">

  <div class="table_main">
  <table class="tb tb2 ">
    <tbody>
      <tr class="hover">
       <th class="td25">删除</th>
       <th class="td25">uid</th>
        <th>用户名</th>
          <th><span style="margin-left: 40px;">头像</span></th>
        <th>推荐人</th>
        <!--<th>登录ip</th>-->
        <th>登录时间</th>
        <!--<th>注册ip</th>-->
        <th>注册时间</th>
     <th>登录次数</th>
        <th>编辑</th> 

        <th>删除</th>    
 
      </tr>
      </tbody>   
      <!--{foreach from=$goods item=v}-->
       <tbody>
      <tr class="hover">  
        <td class="td25"><input type="checkbox" name="del[{$v.uid}]" value="1" class="_del" />
         				 <input type="hidden" name="ids[{$v.uid}]" value="{$v.uid}" />
                         <input type="hidden" name="username[{$v.uid}]" value="{$v.username}" />
                         </td>
        <td class="td25">{$v.uid}</td>
        <td title="{$v.email}">{emoji_unified_to_html($v.username)}</td>
          <td><img src="{$v.picurl}" style="width: 100px; height: 100px;" /></td>
           <td>
           {if $v.t_uid==0}
           {else}
           {$v.t_uid}
          ({emoji_unified_to_html($v.username2)})
           {/if}
           </td>
         <!--<td>{$v.login_ip}</td>-->
        <td  class="_dgmdate" data-time="{$v.login_time}"></td>
        
        <!--<td>{$v.regip}</td>-->
        <td  class="_dgmdate" data-time="{$v.regdate}"></td>
       <td>{$v.login_count}</td>
        
        <td><a href="{$URL}m=member&a=post&uid={$v.uid}" >编辑</a></td>
        
        <td><a href="{$URL}m=member&a=del&uid={$v.uid}" >删除</a></td>
       
        <td>
      </tr>
      </tbody>     
       <!--{/foreach}-->
       <tbody>
      <tr>
        <td class="td25">
        <input type="checkbox" class="_del_all" />反选</td>
        <td><input type="checkbox"  name="_del_all" value="1"/>删除</td>
        <td colspan="12">
        <div class="y">{$showpage}</div>
        <div class="fixsel">
            <input type="submit" class="btn submit_btn" name="onsubmit"  value=" 提 交" >
          </div></td>
      </tr>
    </tbody>
  </table>
  </div>
<input type="hidden" name="m" value="{$CURMODULE}" />
<input type="hidden" name="a" value="{$CURACTION}" />
</form>
<script type="text/javascript">
    function tijiao(obj) {
     $(obj).attr("href","#");
        starttime = $(".starttime").val();
        endtime = $(".endtime").val();
        selecttype=$("#selecttype").val();
        
if(starttime.length==0|| endtime.length==0){
          alert("查询时间不能为空");return;
        }

        starttime=starttime.replace(/-/g,'/');
        endtime=endtime.replace(/-/g,'/');
        starttime=new Date(starttime);
        endtime=new Date(endtime);
        starttime=starttime.getTime();
        endtime=endtime.getTime();
        starttime=(starttime)/1000;
         endtime=(endtime)/1000;
         if(starttime>=endtime){
          alert("起始时时间不能大于或等于结束时间");return;
        }

       $(obj).attr("href",'{$base_url}?m=member&a=main&starttime='+starttime+'&endtime='+endtime+'&selecttype='+selecttype);

       
        

    }

    function openplay(){
        $.ajax({
            url: "{$base_url}?m=member&a=openplay",
            data: {
                allowplay:1
            },
            type: 'post',
            dataType: 'json',

            success: function (data) {
                if(data.r==1){
                    alert('页面开启成功');
                    location.href="{$base_url}?m=member&a=main"
                }
            },

            error: function (data) {}
        });
    }

    function closeplay(){
        $.ajax({
            url:"{$base_url}?m=member&a=closeplay",
            data: {
              allowplay:0
            },
            type: 'post',
            dataType: 'json',

            success: function (data) {
              console.log(data);
                if(data.r==1){
                    alert('页面关闭成功');
                    location.href="{$base_url}?m=member&a=main"
                }
            },

            error: function (data) {

            }
        });
    }
</script>



{include file='../common_admin/right_bar.php'} 